//
//  PayTypeSelectedButton.m
//  XTXOneToOne
//
//  Created by Canny on 2018/11/10.
//  Copyright © 2018年 WK. All rights reserved.
//

#import "PayTypeSelectedButton.h"

@interface PayTypeSelectedButton ()



@end


@implementation PayTypeSelectedButton
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self createUI];
    }
    return self;
}

-(void)createUI{
    
    UIImageView * alipay = [[UIImageView alloc]init];
    [self addSubview:alipay];
    alipay.image = [UIImage imageNamed:@""];
    [alipay mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.mas_left).offset(15);
        make.centerY.equalTo(self.mas_centerY).offset(0);
        make.height.mas_equalTo(18);
        make.width.mas_equalTo(18);
    }];
    _logo = alipay;
    
    UILabel * lab = [[UILabel alloc]init];
    [self addSubview:lab];
    lab.text=@"";
    lab.textColor=RGB(40, 40, 40);
    lab.font=[UIFont boldSystemFontOfSize:15];
    lab.textAlignment = NSTextAlignmentLeft;
    [lab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.bottom.equalTo(self);
        make.centerY.equalTo(self.mas_centerY).offset(0);
        make.left.equalTo(alipay.mas_right).offset(5);
    }];
    _lab = lab;
    
    UIImageView * imgVselected = [[UIImageView alloc]init];
    [self addSubview:imgVselected];
    imgVselected.image = [UIImage imageNamed:@"选择btn-未选中"];
    [imgVselected mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.equalTo(self.mas_right).offset(-15);
        make.centerY.equalTo(self.mas_centerY).offset(0);
        make.height.mas_equalTo(18);
        make.width.mas_equalTo(18);
    }];
    _imgVselected = imgVselected;
}



/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
